import QtQuick 2.0

Item {    
    /*
使用QQmlImageProvider你可以通过C++代码来创建自己的图像提供器，这允许
你动态创建图像并且使用线程加载。
      */
    Image {
        x: 12; y: 12
         width: 48
         height: 118
        //source: "assets/rocket.png"
        source: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1550052014001&di=8d1c9834500d1f0677e9824fd6430434&imgtype=0&src=http%3A%2F%2Fimg.aso.aizhan.com%2Ficon%2F17%2F94%2F33%2F1794331d40d4cf40182c4b4f4944a4e0.jpg"
    }
    Image {
        x: 112; y: 12
        width: 48
        height: 118/2
        //source: "assets/rocket.png"
        source: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1550052014001&di=8d1c9834500d1f0677e9824fd6430434&imgtype=0&src=http%3A%2F%2Fimg.aso.aizhan.com%2Ficon%2F17%2F94%2F33%2F1794331d40d4cf40182c4b4f4944a4e0.jpg"
        /*
Image.Stretch - 图像缩放以适合 (默认)
Image.PreserveAspectFit - 图像均匀缩放以适合而不进行裁剪
Image.PreserveAspectCrop - 图像被均匀缩放以填充，必要时进行裁剪
Image.Tile - 图像水平和垂直复制
Image.TileVertically - 图像水平拉伸并垂直平铺
Image.TileHorizo​​ntally - 图像垂直拉伸并水平平铺
Image.Pad - 图像未转换
          */
        //fillMode: Image.Pad
        fillMode: Image.PreserveAspectCrop
        clip: true  // 允许裁剪，默认不裁剪
    }
}
